home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / i / internet / software / ftpsrvsr / tcpdef.h < prev   
Encoding:
C/C++ Source or Header  |  1992-03-23  |  1.4 KB  |  59 lines

  1. /*     ANS compatible Telnet in AES windows     */
  2. /*         compiled with TURBO-C/PURE-C         */
  3. /*   P. Mayer & H. Wieser TU Vienna  6.3.1992   */
  4.  
  5. /* ANS kompatible Definitionen */
  6.  
  7. #define GetIPAddr(a,b)            gemdos(612,a,b)
  8. #define tcp_open(a,b,c,d,e)        gemdos(630,a,b,c,d,e)
  9. #define tcp_write(a,b,c,d,e)    gemdos(631,a,b,c,(char)d,(char)e)
  10. #define tcp_read(a,b,c)            gemdos(632,a,b,c)
  11. #define    tcp_close(a)            gemdos(633,a)
  12. #define tcp_abort(a)            gemdos(634,a)
  13. #define tcp_stat(a,b)            gemdos(635,a,b)
  14.  
  15. /* DESTI Struktur für Parameterübergabe */
  16. typedef struct sdest
  17. {
  18.     unsigned int        Port;
  19.     unsigned char        IPAddr[4];
  20. } DESTI;
  21.  
  22. /* Länge des Portnamen */
  23. #define        PNAMLEN        10
  24.  
  25. /* TCP-Verbindungsstatus */
  26. #define        CLOSED            0
  27. #define        LISTEN            1
  28. #define        SYN_SENT        2
  29. #define        SYN_RECEIVED    3
  30. #define        ESTABLISHED        4
  31. #define        FIN_WAIT_1        5
  32. #define        FIN_WAIT_2        6
  33. #define        CLOSE_WAIT        7
  34. #define        CLOSING            8
  35. #define        LAST_ACK        9
  36. #define        TIME_WAIT        10
  37.  
  38. /* TCP-Open-Mode */
  39. #define        AKTIV        1
  40. #define        PASSIV        2
  41. #define        PUSH        1
  42. #define        NO_PUSH        0
  43. #define        URGENT        1
  44. #define        NO_URGENT    0
  45.  
  46. /* TCP-Statusblock fuer tcp_stat() */
  47.  
  48. typedef struct stcpst
  49. {
  50.     unsigned int    TCP_ID;
  51.     unsigned int    TCP_Port;
  52.     DESTI            TCP_Dest;
  53.     unsigned int    TCP_State;
  54.     long            TCP_Urgent;
  55.     int                TCP_Timeout;
  56.     unsigned long    TCP_RWin;
  57.     unsigned long    TCP_RWfree;
  58. } TCPSTAT;
  59.